//
//  BFMealFooterView.m
//  BFoodSystem
//
//  Created by 浙江择富 on 2018/2/3.
//  Copyright © 2018年 陈名正. All rights reserved.
//

#import "BFMealFooterView.h"
@implementation BFMealFooterView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.addBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        self.addBtn.backgroundColor = [UIColor lightGrayColor];
        [self.addBtn setTitle:@"新增套餐" forState:UIControlStateNormal];
        [self.addBtn addTarget:self action:@selector(addBtn:) forControlEvents:UIControlEventTouchUpInside];
        [self.contentView addSubview:self.addBtn];
      
        
    }
    return self;
    
}
- (void)layoutSubviews{
    [super layoutSubviews];
    [self.addBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self);
        make.top.equalTo(self).offset(5);
        make.bottom.equalTo(self).offset(-5);
        
    }];
    
}
- (void)addBtn:(UIButton *)btn {
  
    if ([ self.delegate respondsToSelector:@selector(clickButton:)]) {
        [self.delegate clickButton:btn];
    }
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
